#include "widget.h"
#include "ui_widget.h"
#include <QLabel>

Widget::Widget(QWidget *parent)
    : QWidget(parent)
    , ui(new Ui::Widget)
{
    ui->setupUi(this);
    //必须得用new, 然后声明周期交给对象树来控制
    QLabel* label = new QLabel(this);
    label->setText("Hello World");
}

Widget::~Widget()
{
    delete ui;
}

